/* 全局less函数，全局可用不需要单独import，通过sass-resources-loader实现全局注入，具体请查看webpack配置 */
.flex-center () {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 1px 底边框 */
.border (@borderTop: 0, @borderRight: 0, @borderBottom: 0, @borderLeft: 0, @borderColor: @primaryBorder) {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-style: solid;
  border-color: @borderColor;
  border-top-width: @borderTop;
  border-right-width: @borderRight;
  border-bottom-width: @borderBottom;
  border-left-width: @borderLeft;
  box-sizing: border-box;
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: left top;
  pointer-events: none; /* 防止元素被遮盖后无法点击 */
}

.text-ellipsis () {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
